import request from '@/utils/request'

// 子任务列表
export function listUserTask(query) {
    return request({
        url: '/teacher/evaluation/mytask/list',
        method: 'get',
        params: query
    })
}
//子任务考评数据保存或提交
export function saveOrSubmitData(data) {
    return request({
        url: '/teacher/evaluation/mytask/saveOrSubmitData',
        method: 'post',
        data
    })
}
//查询我的任任务详情（任务数据、打分项数据）
export function infoByUserTask(ids) {
    return request({
        url: '/teacher/evaluation/mytask/info/'+ids,
        method: 'get',
    })
}

// 删除任务
export function del(ids) {
    return request({
        url: '/teacher/evaluation/task/deleteByIds/' + ids,
        method: 'delete'
    })
}
//修改
export function update(id,data) {
    return request({
        url: '/teacher/evaluation/task/update/'+id,
        method: 'put',
        data: data
    })
}
//受评人条件查询
export function userEvItem(query) {
    console.log("userEvItem", query);
    return request({
        url: '/teacher/evaluation/task/list/user',
        method: 'get',
        params: query
    })
}
//学年条件查询
export function academicYearEvItem() {
    return request({
        url: '/teacher/evaluation/task/list/academicYear',
        method: 'get',
    })
}
//学年对应的学期条件查询
export function academicTermtimeEvItem(id) {
    console.log("academicTermtimeEvItem", id);
    return request({
        url: '/teacher/evaluation/task/list/listTermtime/' + id,
        method: 'get',
    })
}
//学年对应的学期条件查询
export function academicMonthEvItem(id) {
    console.log("academicMonthEvItem", id);
    return request({
        url: '/teacher/evaluation/task/list/listMonth/' + id,
        method: 'get',
    })
}